﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Hook.Keyboard
{
    class Program
    {
        static void Main(string[] args)
        {            
            System.Tools.Hook.Keyboard.HookKeyboard.SetHook();
            System.Tools.Hook.Keyboard.HookKeyboard.OnHook += new EventHandler<System.Tools.Hook.Keyboard.HookEvent>(HookKeyboard_OnHook);

            Console.ReadLine();

            System.Tools.Hook.Keyboard.HookKeyboard.UnHook();
        }

        static void HookKeyboard_OnHook(object sender, System.Tools.Hook.Keyboard.HookEvent e)
        {
            Console.WriteLine("Code={0}, lParame={1} wParam={2}", e.code, e.lParam.ToString(), e.wParam.ToString()); 
        }
    }
}
